package com.xiaoge.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

/**
* @Author: 冷俊杰
* @Description: TODO
* @DateTime: 2022/10/28 10:29
**/
/**
    * 课程信息
    */
@Data
@ToString
@TableName(value = "edu_course")
public class EduCourse {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "gmt_create",fill = FieldFill.INSERT)//创建时自动填充
    private Date gmtCreate;

    /**
     * 修改时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "gmt_modified",fill = FieldFill.INSERT_UPDATE)//创建与修改时自动填充
    private Date gmtModified;

    /**
     * 状态(1:正常，0:禁用)
     */
    @TableField(value = "status_id")
    private Byte statusId;

    /**
     * 排序
     */
    @TableField(value = "sort")
    private Integer sort;

    /**
     * 讲师用户编码
     */
    @TableField(value = "lecturer_user_no")
    private Long lecturerUserNo;

    /**
     * 分类ID
     */
    @TableField(value = "category_id")
    private Long categoryId;

    /**
     * 课程名称
     */
    @TableField(value = "course_name")
    private String courseName;

    /**
     * 课程封面
     */
    @TableField(value = "course_logo")
    private String courseLogo;

    /**
     * 课程介绍
     */
    @TableField(value = "introduce")
    private String introduce;

    /**
     * 是否免费：1免费，0收费
     */
    @TableField(value = "is_free")
    private Byte isFree;

    /**
     * 原价
     */
    @TableField(value = "course_original")
    private BigDecimal courseOriginal;

    /**
     * 优惠价
     */
    @TableField(value = "course_discount")
    private BigDecimal courseDiscount;

    /**
     * 是否上架(1:上架，0:下架)
     */
    @TableField(value = "is_putaway")
    private Byte isPutaway;

    /**
     * 课程排序(前端显示使用)
     */
    @TableField(value = "course_sort")
    private Integer courseSort;

    /**
     * B站链接(外站链接)
     */
    @TableField(value = "blibli_link")
    private String blibliLink;

    /**
     * 购买人数
     */
    @TableField(value = "count_buy")
    private Integer countBuy;

    /*
     * 分类名称
     * */
    @TableField(exist = false)
    private String categoryName;

    /*
     *讲师名称
     * */
    @TableField(exist = false)
    private String lecturerName;

    public static final String COL_ID = "id";

    public static final String COL_GMT_CREATE = "gmt_create";

    public static final String COL_GMT_MODIFIED = "gmt_modified";

    public static final String COL_STATUS_ID = "status_id";

    public static final String COL_SORT = "sort";

    public static final String COL_LECTURER_USER_NO = "lecturer_user_no";

    public static final String COL_CATEGORY_ID = "category_id";

    public static final String COL_COURSE_NAME = "course_name";

    public static final String COL_COURSE_LOGO = "course_logo";

    public static final String COL_INTRODUCE_ID = "introduce_id";

    public static final String COL_IS_FREE = "is_free";

    public static final String COL_COURSE_ORIGINAL = "course_original";

    public static final String COL_COURSE_DISCOUNT = "course_discount";

    public static final String COL_IS_PUTAWAY = "is_putaway";

    public static final String COL_COURSE_SORT = "course_sort";

    public static final String COL_BLIBLI_LINK = "blibli_link";

    public static final String COL_COUNT_BUY = "count_buy";
}